﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Oliving.Edge.Model.Seed
{




    public class EdgeFrameSeed
    {

        /// <summary>
        /// 生成Model层
        /// </summary>
        /// <param name="myContext"></param>
        /// <returns></returns>
        public static bool EdgeCreateClass(EdgeContext myContext)
        {

            try
            {
                myContext.EdgeCreateClass(
                    $@"C:\EdgeFile\",

               new string[] { "Base_EquipmentCategory" }, "XLT");

                //new string[] { "Base_EquipmentCategory" }, "XLT");

                //new string[] { "Base_Equipment" }, "XLT");

                //new string[] { "Sys_Dept", "WY_Company", "WY_Project" }, "");

                return true;
            }
            catch (Exception ee)
            {
                return false;
            }

        }



        public static bool EdgeGetData(EdgeContext myContext)
        {
            try
            {
                myContext.EdgeGetData(
                    $@"C:\EdgeFile\Edge.Data\",
                    new string[] { }, "");
                return true;
            }
            catch (Exception ee)
            {
                return false;
            }

        }

        /// <summary>
        /// 生成菜单和接口数据
        /// </summary>
        /// <param name="myContext"></param>
        /// <returns></returns>
        public static bool InsertfunctionData(EdgeContext myContext)
        {
            try
            {
                //   myContext.InsertfunctionData_Page(myContext, "School", "考试成绩", "School_Examination", "考试登记");
                //   myContext.InsertfunctionData_Page(myContext, "SystemBase", "菜单权限管理", "Sys_DataDictionary", "数据字典");
                //  myContext.InsertfunctionData_Page(myContext, "User", "用户角色管理", "Sys_Dept", "部门管理");

                //    myContext.InsertfunctionData_Page(myContext, "XLT", "公司管理", "WY_Company", "公司管理");
                myContext.InsertfunctionData_Page(myContext, "MQXT", "报表管理", "CaiJiQiModelValue", "值");
                myContext.InsertfunctionData_Page(myContext, "MQXT", "报表管理", "MQXT_CaiJiQiModel", "采集器");
                myContext.InsertfunctionData_Page(myContext, "MQXT", "报表管理", "MQXT_DataShowModel", "显示");
                myContext.InsertfunctionData_Page(myContext, "MQXT", "报表管理", "MQXT_JiZhongQiModel", "集中器");



                return true;
            }
            catch (Exception ee)
            {
                return false;
            }
        }




    }



}
